package com.qys.livesMall.shop.service;

import com.qys.livesMall.shop.modal.dto.QueryProductsDTO;
import com.qys.livesMall.shop.modal.entity.ShopGoodsInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gmx
 * @since 2023-06-07
 */
public interface ShopGoodsInfoService extends IService<ShopGoodsInfo> {
    List<ShopGoodsInfo> getGoodsInfo(String goodsId, String shopId);

    /**
     * 推荐商品（随机）
     * @return
     */
    List<ShopGoodsInfo> productRecommended();

    /**
     * 根据用户偏好推荐商品
     * @param dto 查询对象
     * @return
     */
    List<ShopGoodsInfo> queryProductsBasedOnUserPreferences(QueryProductsDTO dto);

    /**
     * 获取店铺最后的上架时间
     * @return
     */
    LocalDateTime getLastUpShelfTime(Long shopId);

    void upDown(Long shopGoodsId,boolean status);
}
